package de.alfenory.autobill.entity;

import java.util.Arrays;
import java.util.Objects;

/**
 *
 * @author alefen
 */
public class Part {
    String id;
    String account;
    int taxId;
    int dimension[];

    public Part(String id, String account, int taxId, int dimension[]) {
        this.id = id;
        this.account = account;
        this.taxId = taxId;
        this.dimension = dimension;
    }

    public String getId() {
        return id;
    }

    public String getAccount() {
        return account;
    }

    public int getTaxId() {
        return taxId;
    }

    public int[] getDimension() {
        return dimension;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 67 * hash + Objects.hashCode(this.id);
        hash = 67 * hash + Objects.hashCode(this.account);
        hash = 67 * hash + this.taxId;
        hash = 67 * hash + Arrays.hashCode(this.dimension);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Part other = (Part) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        if (!Objects.equals(this.account, other.account)) {
            return false;
        }
        if (this.taxId != other.taxId) {
            return false;
        }
        if (!Arrays.equals(this.dimension, other.dimension)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Part{" + "id=" + id + ", account=" + account + ", taxId=" + taxId + ", dimension=" + dimension + '}';
    }
    
    
    
}